package demo2;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-08-09
 * Time: 10:04
 */
public class TestDemo {

    public static void main(String[] args) {
        try(OutputStream outputStream = new FileOutputStream("text.txt")){
            outputStream.write('h');
            outputStream.write('e');
            outputStream.write('l');
            outputStream.write('l');
            outputStream.write('o');
            outputStream.close();
        }catch(IOException e){
            e.printStackTrace();
        }
    }

}
